<?php /* Smarty version Smarty-3.1.21-dev, created on 2015-11-09 10:36:47
         compiled from "H:\WebApplication\myconpany\sumi_mobile\application\views\common\headersearch.html" */ ?>
<?php /*%%SmartyHeaderCode:2460656309544ac47e0-92067822%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    'd09c2b954b16f2c2d96c4dc5ab8467fd4dbc673d' => 
    array (
      0 => 'H:\\WebApplication\\myconpany\\sumi_mobile\\application\\views\\common\\headersearch.html',
      1 => 1447036582,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '2460656309544ac47e0-92067822',
  'function' => 
  array (
  ),
  'version' => 'Smarty-3.1.21-dev',
  'unifunc' => 'content_56309544acd5b7_63818813',
  'variables' => 
  array (
    'keyword' => 0,
  ),
  'has_nocache_code' => false,
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_56309544acd5b7_63818813')) {function content_56309544acd5b7_63818813($_smarty_tpl) {?><header class="header-wrap">
    <a href="javascript:void (0)" class="back-off" onclick="window.history.back()"></a>
    <div class="list-search"><input type="text" name="keyword" class="ls-text" value="<?php if ($_smarty_tpl->tpl_vars['keyword']->value!='') {
echo $_smarty_tpl->tpl_vars['keyword']->value;
}?>" placeholder="LLDPE"><input class="ls-btn" type="button" value=""></div>
    <a href="#" class="list-bar"></a>
</header>
<section class="list-menu" style="display:none;">
</section>


<?php echo '<script'; ?>
 type="text/javascript">
    $(function(){
        var time =new Date();
        var aDent = true;
        var oParent = $('.list-bar');
        var oNodeContent = $('.list-menu');
        oParent.click(function(){
            $.ajax({
                url:'/category/index',
                data:{v:time},
                async:true,
                type:'POST',
                success:function(data){
                    var data = eval("("+data+")");
                    catelist(data);
                },
                dataType:'text'
            });
            if(aDent){
                oNodeContent.stop().slideDown(500);
            }else{
                oNodeContent.stop().slideUp(500);
            }
            aDent = !aDent;
        });
    });

    function catelist(data){
        var list = data;
        var html = "<ul>";
        var i = 1;
        for(var x in list) {
            html += "<li>";
            html += "<a href='/price/index/cn/"+list[x].key+"'>";
            html += "<span class=\"me"+ i +"-icon mi\"></span>";
            html += "<span class=\"mname\">"+list[x].key+"</span>";
            html += "<span class=\"fr orange\">"+list[x].num+ "吨</span>";
            html += "</a>";
            html += "</li>";
            i++;
        }
        html += "</ul>";
        $(".list-menu").html(html);
    }

<?php echo '</script'; ?>
>
<?php }} ?>
